<?php
return [
  'env_items' => [
    'os' => [
      'key'  => 'PHP_OS',
      'name' => '操作系统',
      'need' => 'noRestriction',
      'reco' => 'Linux系统',
      'res'  => '检测中'
    ],
    'server' => [
      'key'  => 'SERVER_SOFTWARE',
      'name' => '服务器环境',
      'need' => 'apache/nginx',
      'reco' => 'apache2.0/nginx1.6以上',
      'res'  => '检测中'
    ],
    'php' => [
      'key'  => 'PHP_VERSION',
      'name' => 'PHP版本',
      'need' => '7.4.0',
      'reco' => '＞7.4.0',
      'res'  => '检测中'
    ],
    'pdo' => [
      'key'  => 'pdo',
      'name' => 'PDO扩展',
      'need' => '启用',
      'reco' => '必须开启',
      'res'  => '检测中'
    ],
    'gd' => [
      'key'  => 'gd_info',
      'name' => 'GD库',
      'need' => '1.0',
      'reco' => '必须开启',
      'res'  => '检测中'
    ],
    'curl' => [
      'key'  => 'curl',
      'name' => 'CURL库',
      'need' => '启用',
      'reco' => '必须扩展',
      'res'  => '检测中'
    ],
    'fileinfo' => [
      'key'  => 'finfo_open',
      'name' => 'fileinfo库',
      'need' => '启用',
      'reco' => '必须扩展',
      'res'  => '检测中'
    ],
    'openssl' => [
      'key'  => 'openssl',
      'name' => 'openssl库',
      'need' => '启用',
      'reco' => '必须扩展',
      'res'  => '检测中'
    ],
    'bcmath' => [
      'key'  => 'bcmath',
      'name' => 'bcmath库',
      'need' => '启用',
      'reco' => '必须扩展',
      'res'  => '检测中'
    ],
    'file_uploads' => [
      'key'  => 'file_uploads',
      'name' => '附件上传',
      'need' => 'noRestriction',
      'reco' => '＞2M',
      'res'  => '检测中'
    ],
    'disk_space' => [
      'key'  => 'disk_free_space',
      'name' => '硬盘空间',
      'need' => '100MB',
      'reco' => '＞200MB',
      'res'  => '检测中'
    ],
  ],
  //目录、文件权限检查
  'dir_items' => [
    '.env',
    'config/database.php',
    'public',
    'config',
    'app/install',
    'public/storage',
    'runtime',
    'public/pc/static/js',
    'data',
  ],
  //函数依赖性检查
  'function_items' => [
    'pdo_mysql' => [
      'key'  => 'pdo_mysql',
      'name' => 'pdo_mysql()',
      'reco' => '必须',
      'need' => '开启',
      'res'  => '检测中'
    ],
    'file_put_contents' => [
      'key'  => 'file_put_contents',
      'name' => 'file_put_contents()',
      'reco' => '必须',
      'need' => '开启',
    ],
    'file_get_contents' => [
      'key'  => 'file_get_contents',
      'name' => 'file_get_contents()',
      'reco' => '必须',
      'need' => '开启',
    ],
    'xml_parser_create' => [
      'key'  => 'xml_parser_create',
      'name' => 'xml_parser_create()',
      'reco' => '必须',
      'need' => '开启',
    ],
    'gethostbyname' => [
      'key'  => 'gethostbyname',
      'name' => 'gethostbyname()',
      'reco' => '必须',
      'need' => '开启',
    ],
    'fsockopen' => [
      'key'  => 'fsockopen',
      'name' => 'fsockopen()',
      'reco' => '必须',
      'need' => '开启',
    ],
    'imagettftext' => [
      'key'  => 'imagettftext',
      'name' => 'imagettftext()',
      'reco' => '必须',
      'need' => '开启',
    ],
    'stream_socket_server' => [
      'key'  => 'stream_socket_server',
      'name' => 'stream_socket_server()',
      'reco' => '必须',
      'need' => '开启',
    ],
    'stream_socket_client' => [
      'key'  => 'stream_socket_client',
      'name' => 'stream_socket_client()',
      'reco' => '必须',
      'need' => '开启',
    ],
    'pcntl_signal_dispatch' => [
      'key'  => 'pcntl_signal_dispatch',
      'name' => 'pcntl_signal_dispatch()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'pcntl_signal' => [
      'key'  => 'pcntl_signal',
      'name' => 'pcntl_signal()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'pcntl_alarm' => [
      'key'  => 'pcntl_alarm',
      'name' => 'pcntl_alarm()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'pcntl_fork' => [
      'key'  => 'pcntl_fork',
      'name' => 'pcntl_fork()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_getuid' => [
      'key'  => 'posix_getuid',
      'name' => 'posix_getuid()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_getpwuid' => [
      'key'  => 'posix_getpwuid',
      'name' => 'posix_getpwuid()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_kill' => [
      'key'  => 'posix_kill',
      'name' => 'posix_kill()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_setsid' => [
      'key'  => 'posix_setsid',
      'name' => 'posix_setsid()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_getpid' => [
      'key'  => 'posix_getpid',
      'name' => 'posix_getpid()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_getpwnam' => [
      'key'  => 'posix_getpwnam',
      'name' => 'posix_getpwnam()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_getgrnam' => [
      'key'  => 'posix_getgrnam',
      'name' => 'posix_getgrnam()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_getpwnam' => [
      'key'  => 'posix_getpwnam',
      'name' => 'posix_getpwnam()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_getgid' => [
      'key'  => 'posix_getgid',
      'name' => 'posix_getgid()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_setgid' => [
      'key'  => 'posix_setgid',
      'name' => 'posix_setgid()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_initgroups' => [
      'key'  => 'posix_initgroups',
      'name' => 'posix_initgroups()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_setuid' => [
      'key'  => 'posix_setuid',
      'name' => 'posix_setuid()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
    'posix_isatty' => [
      'key'  => 'posix_isatty',
      'name' => 'posix_isatty()',
      'reco' => 'noRestriction',
      'need' => 'Linux下建议开启',
    ],
  ],
  //数据库
  'data_items' => [
    'onlydb' => [
      'name'      => '盛筑OA数据库',
      'host'      => '127.0.0.1',
      'port'      => 3306,
      'user'      => 'root',
      'password'  => '123456',
      'id'        => 'onlydb',
      'dbname'    => 'szoa_onlydb',
      'prefix'    => 'sz_',
      'dbfile'    => 'szoa.sql',
      'app'       => 'szoa_backend',
      'username'  => 'admin',
      'userpwd'   => '123456',
    ],
  ],
  'redis_items' => [
    'redis' => [
      'host' => '127.0.0.1',
      'port' => 6379,
      'password' => ''
    ]
  ]
];
